﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace NGinnBPM.Lib.Messages
{
    public class GenericSuccess<T> : ICorrelatedMessage
    {
        public GenericSuccess(T original)
        {
        }

        public GenericSuccess()
        {
        }

        public string CorrelationId { get; set; }
    }

    [Serializable]
    public class GenericResponse<T, R> : ICorrelatedMessage
    {
        public GenericResponse(T original, R result)
        {
            ICorrelatedMessage m = (ICorrelatedMessage)original;
            CorrelationId = m.CorrelationId;
            Result = result;
        }

        public GenericResponse()
        {
        }

        public R Result { get; set; }
        public string CorrelationId { get; set; }
    }

    
}
